function [T_order, T] = dynamic_g2_tt(y, x, params, steady_state, T_order, T)
if T_order >= 2
    return
end
[T_order, T] = P15ra.sparse.dynamic_g1_tt(y, x, params, steady_state, T_order, T);
T_order = 2;
if size(T, 1) < 69
    T = [T; NaN(69 - size(T, 1), 1)];
end
T(39) = (params(4)-1)*params(8)*(-1)/(y(15)*y(15));
T(40) = (params(4)-1)*(-1)/(y(15)*y(15));
T(41) = getPowerDeriv(y(12),1-y(20),2);
T(42) = T(20)*T(21)+log(y(12))*T(41)+T(20)*T(21)+T(2)*(-1)/(y(12)*y(12));
T(43) = T(42)/(y(20)-1)+T(41)/T(3);
T(44) = getPowerDeriv(y(12),(-y(20)),2);
T(45) = y(12)^(1-y(20)-1);
T(46) = (y(20)-1)*(log(y(12))*((1-y(20))*T(35)*T(45)-T(45))+T(21)*T(2)*T(35))-(log(y(12))*T(20)+T(2)*T(21));
T(47) = T(46)/((y(20)-1)*(y(20)-1))+(T(3)*((1-y(20))*T(35)*T(45)-T(45))-T(20)*2*(y(20)-1))/(T(3)*T(3));
T(48) = y(12)^((-y(20))-1);
T(49) = (-((-y(11))*(y(15)+y(15))))/(y(15)*y(15)*y(15)*y(15));
T(50) = (y(20)-1)*(y(20)-1)*(y(20)-1)*log(y(12))*T(35)*T(2)*T(35)-((y(20)-1)*log(y(12))*T(2)*T(35)-T(2)*log(y(12)))*(y(20)-1+y(20)-1);
T(51) = T(3)*T(3)*(T(2)*T(35)*2*(y(20)-1)+T(3)*T(35)*T(2)*T(35)-(T(2)*T(35)*2*(y(20)-1)+2*(T(2)-1)))-(T(3)*T(2)*T(35)-(T(2)-1)*2*(y(20)-1))*(T(3)*2*(y(20)-1)+T(3)*2*(y(20)-1));
T(52) = T(50)/((y(20)-1)*(y(20)-1)*(y(20)-1)*(y(20)-1))+T(51)/(T(3)*T(3)*T(3)*T(3));
T(53) = (-1)/(y(13)*y(13));
T(54) = getPowerDeriv(y(22),1-y(30),2);
T(55) = T(24)*T(25)+log(y(22))*T(54)+T(24)*T(25)+T(7)*(-1)/(y(22)*y(22));
T(56) = params(4)*params(8)*params(1)*(T(55)/(y(30)-1)+T(54)/T(8));
T(57) = params(1)*getPowerDeriv(y(22),(-y(30)),2);
T(58) = y(22)^(1-y(30)-1);
T(59) = (y(30)-1)*(log(y(22))*((1-y(30))*T(37)*T(58)-T(58))+T(25)*T(7)*T(37))-(log(y(22))*T(24)+T(7)*T(25));
T(60) = params(4)*params(8)*params(1)*(T(59)/((y(30)-1)*(y(30)-1))+(T(8)*((1-y(30))*T(37)*T(58)-T(58))-T(24)*2*(y(30)-1))/(T(8)*T(8)));
T(61) = y(22)^((-y(30))-1);
T(62) = (-((-y(21))*(y(13)+y(13))))/(y(13)*y(13)*y(13)*y(13));
T(63) = (y(30)-1)*(y(30)-1)*(y(30)-1)*log(y(22))*T(37)*T(7)*T(37)-((y(30)-1)*log(y(22))*T(7)*T(37)-T(7)*log(y(22)))*(y(30)-1+y(30)-1);
T(64) = T(8)*T(8)*(T(7)*T(37)*2*(y(30)-1)+T(8)*T(37)*T(7)*T(37)-(T(7)*T(37)*2*(y(30)-1)+2*(T(7)-1)))-(T(8)*T(7)*T(37)-(T(7)-1)*2*(y(30)-1))*(T(8)*2*(y(30)-1)+T(8)*2*(y(30)-1));
T(65) = params(4)*params(8)*params(1)*(T(63)/((y(30)-1)*(y(30)-1)*(y(30)-1)*(y(30)-1))+T(64)/(T(8)*T(8)*T(8)*T(8)));
T(66) = getPowerDeriv(y(3),params(4),2);
T(67) = getPowerDeriv(y(15),1-params(4),2);
T(68) = params(4)*getPowerDeriv(y(3),params(4)-1,2);
T(69) = getPowerDeriv(y(15),(-params(4)),2);
end
